<a href="javascript:;" class="logo" id="logodowon"><i class="iconfont icon-xialasanjiao-copy"></i></a>   
<div class="mod_music">
    <!-- 歌词内容区 -->
    <div class="music_content">
        <!-- music-img -->
        <div class="music_content_left"><img id="image" src="music/imge/show" alt="歌曲图片" height="300" width="300"></div>
        <!-- music geci -->
        <div class="music_content_right">
            <h1 class="music_header js_songname"></h1>
            <div class="song_info_name">
                <span>歌手:</span>
                <a draggable="false"  href="javascript:;" class="js_songsonger"></a>
            </div>
            <div class="song_info_zj">
                <span>专辑:</span>
                <a href="javascript:;" class="js_songalbum">ForMe+You</a>
            </div>
            <div class="song_info_gc js_lrc">
            </div>
        </div>
    </div> 
    <!-- 底部播放条 -->
    <div class="music_footer">
        <div class="music_fo_content">   
            <!--上一首 暂停 下一首 -->
            <a href="javascript:;" class="tuzi"><i class="iconfont icon-youbofang-copy-copy"></i></a>
            <a href="javascript:;" class="tuzi js_lrcstop" style="top: 18px !important;"><i class="iconfont icon-xinzanting1"></i></a>
            <a href="javascript:;" class="tuzi "><i class="iconfont icon-youbofang"></i></a>       
            <div class="footer_top music_info">
                <!-- 播放时间 -->
                <div class="music_time">
                    <div class="music_time_left">
                        <span class="js_songname"></span>-
                        <span class="js_songsonger"></span>
                    </div>
                    <div class="music_time_right">
                        <span class="timeend">00:00</span>/<span class="timestar">00:00</span>   
                    </div>        
                </div>
                <!-- 播放进度条 -->
                <div class="lanren">
                    <div class="process js_precess" id="js_playlrc">
                        <a href="javascript:;" draggable="false" class="bg_value js_pre"  id="playPre_lrc"></a>
                        <a href="javascript:;" draggable="false" class="bg_bar"></a>
                        <a href="javascript:;" draggable="false" class="process_circle js_prevalue" id="playPrevalue_lrc" >
                            <span id="playcicrl_lrc"></span>
                        </a>
                    </div>
                </div>             
            </div>
            <div class="music_info">
                <a href="javascript:;" class="tuzi js_changeMode js_lrcchangeMode"><i class="iconfont icon-shunxubofang" title="顺序播放"></i></a>
            </div>
            <a href="javascript:;" class="js_lrcloverfoot js_loverfoot loverfooter"><i class="iconfont icon-aixinkong1"></i></a>
            <a href="javascript:;" class="tuzi js_download js_lrcdownload"><i class="iconfont icon-xinxiazai"></i></a>
            <!-- <a href="javascript:;" class="zhunxin tuzi  js_zhunxin" ><i class="iconfont icon-zhunxintouming"></i></a>  -->
            <div class="music_info sound">
                <a href="javascript:;" class="tuzi js_metd"><i class="iconfont icon-xinyinliang"></i></a>
                <!-- 音量滚动条 -->
                <div class="lanren1">
                    <div class="process1 js_precess_sound" id="soundPrecess_lrc">
                        <a href="javascript:;" draggable="false" class="bg_value1 js_lrcsoundpre"  id="soundPre_lrc"></a>
                        <a href="javascript:;" draggable="false" class="bg_bar1"></a>
                        <a href="javascript:;" draggable="false" class="process_circle1 js_lrcsoundprevalue" id="soundPrevalue_lrc" >
                            <span id="soundcicrl_lrc"></span>
                        </a>
                    </div>
                </div> 
            </div>   
            <div class="music_info footer_right js_playerlan" >
                <a href="javascript:;" class="tuzi" title="播放列栏"><i class="iconfont icon-xinbofangliebiao"></i><span class="music_num js_songtotle">0</span></a>        
            </div>
        </div>
    </div>
    <!-- 播放列栏  -->
    <div class="player js_lrcp" style="display:none;">
        <h2>播放列表</h2>
        <div class="player_tool">
            <div class="player_tool_num music_info"><span class="js_songtotle">0</span>首歌曲</div>
        </div>
        <div class="js_testscroll testscroll">
            <ul class="player_list js_bofanglist js_songlistheader">
                
            </ul>            
        </div>
        <div class="lrc_loading"><img src="img/loading.gif" alt=""></div>
        <div class="lrc_end"><p>没有数据可以加载啦♪(^∇^*)</p></div>
    </div>            
</div>   

<script>
    let footerPlay = {
        init(){
            playerMusic.playIndex(function(){
                $(".js_footestop").data("index",this.num);
            });

            this.download();
            this.changeMode();
            this.lover();
        },
        //
        download(){
            $(".js_lrcdownload").on("click",function(){
                var indexNum = $(".js_footestop").data("index");
                var src = playerMusic.arrSongs[indexNum];
                //不能使用页面跳转，得新开窗口
                var url = "music/download/downloadsong?src="+src;
                window.open(url);
            })
        },
        //歌曲模式切换
        changeMode(){
            $(".js_lrcchangeMode").click(function(){
                if($(".js_lrcchangeMode").find("i").hasClass("icon-shunxubofang")){
                    //单曲循环
                    $(".js_lrcchangeMode").find("i").removeClass("icon-shunxubofang").addClass("icon-danquxunhuan");
                    $(".js_lrcchangeMode").find("i").attr("title","单曲循环");
                    playerMusic.playModel="singleLoop"
                }else if($(".js_lrcchangeMode").find("i").hasClass("icon-danquxunhuan")){
                    //随机播放
                    $(".js_lrcchangeMode").find("i").removeClass("icon-danquxunhuan").addClass("icon-suijibofang");
                    $(".js_lrcchangeMode").find("i").attr("title","随机播放");
                    playerMusic.playModel="randomLoop"
                }else if($(".js_lrcchangeMode").find("i").hasClass("icon-suijibofang")){
                    //循环列表
                    $(".js_lrcchangeMode").find("i").removeClass("icon-suijibofang").addClass("icon-liebiaoxunhuan");
                    $(".js_lrcchangeMode").find("i").attr("title","循环播放");
                    playerMusic.playModel="listLoop"
                }else {
                    //顺序播放
                    playerMusic.playModel="shunxunLoop"
                    $(".js_lrcchangeMode").find("i").removeClass("icon-liebiaoxunhuan").addClass("icon-shunxubofang");
                    $(".js_lrcchangeMode").find("i").attr("title","顺序播放");
                }
            })
        },
        lover(){
            $(".js_lrcloverfoot").on("click",function(){

                if(isLogin == true){
                    var index = $(".js_footestop").data("index");
                    var mid = $(".js_footestop").data("id");
                    if($(this).find('i').hasClass("icon-aixinkong1")){
                        $(".js_loverfoot").find("i").removeClass("icon-aixinkong1").addClass("icon-aixin1").css("color","rgba(247, 59, 59, 0.8)")
                        $(".js_lrcloverfoot").find("i").removeClass("icon-aixinkong1").addClass("icon-aixin1").css("color","rgba(247, 59, 59, 0.8)")
                        $(".js_songlistheader").find(`.js_songli[data-index=${index}]`).find(".js_lover i").removeClass("icon-aixinkong1").addClass("icon-aixin1").css("color","rgba(247, 59, 59, 0.8)")
                        //收藏当前播放歌曲（播放条小爱心）
                        $.ajax({
                            url : "music/addtosonglist/addtolike",
                            data : {mid:mid},
                            dataType : "json",
                            type : "post",
                            success : function(data) {
                                if(data.Tip==true){
                                    $this.tip("成功添加到mylove(￣▽￣)~*");
                                }else if(data.Tip==false){
                                    $this.tip("取消收藏失败╮(╯▽╰)╭");
                                }
                            },
                            error : function(data) {
                            }
                        });
                    }else{
                        $(".js_loverfoot").find("i").removeClass("icon-aixinkong1").addClass("icon-aixinkong1 ").css("color","#c3c3c3");
                        $(".js_lrcloverfoot").find("i").removeClass("icon-aixinkong1").addClass("icon-aixinkong1 ").css("color","#c3c3c3");
                        $(".js_songlistheader").find(`.js_songli[data-index=${index}]`).find(".js_lover i").removeClass("icon-aixin1").addClass("icon-aixinkong1").css("color","#c3c3c3")
                        //取消收藏（播放条小爱心）
                        $.ajax({
                            url : "music/addtosonglist/outtolike",
                            data : {mid:mid},
                            dataType : "json",
                            type : "post",
                            success : function(data) {
                                if(data.Tip==true){
                                    $this.tip("谢谢你曾经喜欢我┭┮﹏┭┮");
                                }else if(data.Tip==false){
                                    $this.tip("取消收藏失败╮(╯▽╰)╭");
                                }
                            },
                            error : function(data) {
                            }
                        });
                    }
                }else{
                    $this.tip("小伙伴忘记登录啦(≧∇≦)ﾉ")
                }
            })
        }
    };
    footerPlay.init()

</script>